skeleton_get_minmax


语法:

skeleton_get_minmax();


返回:

Array (4 elements: xMin, yMin, xMax, yMax)


描述

This function will return an array with the total bounding box value for all the individual bounding boxes assigned to a skeleton animation sprite. The returned array will have 4 elements:

重要!该函数在试用版(Trial License)产品中可用。


例如:

var frame = skeleton_animation_get_frame(0);
if frame > 0 && frame < 2
    {
    var box = skeleton_get_minmax();
    var ww = (box[2] - box[0]) / 2;
    var hh = (box[3] - box[1]) / 2;
    part_particles_create(global.p_sys, box[0] + ww, box[1] + hh, global.Stars, 10);
    }

The above code will check the current frame of the animation assigned to track 0 and then burst some particles from a point in the middle of the total bounding box for the sprite.